const Generator = require('yeoman-generator');
module.exports = class extends Generator{
  prompting(){
    return this.prompt([
      {
        type:'input',
        name:'name',
        message:'Your project name',
        default:this.appname
      },
      {
        type:'confirm',
        name:'confirm',
        message:'确定创建项目?',
      },
    ]).then(answers=>{
      this.answers = answers;
    })
  }

  writing(){
    this.fs.copyTpl(
      this.templatePath('readme.md'),
      this.destinationPath('readme.md'),
      this.answers
    )
  }
}